﻿using System;
using System.IO;
using System.Threading;
using System.Windows.Controls;
using System.Windows.Forms;
using System.Windows.Xps.Packaging;

namespace PowerMonitor
{
    public partial class CompanyProfile : Form
    {
        private DocumentViewer documentViewer;
        public CompanyProfile()
        {
            InitializeComponent();
            documentViewer = new DocumentViewer();
            wpfHost.Child = documentViewer;
        }

        private void CompanyProfile_Load(object sender, EventArgs e)
        {
            XpsDocument doc = null;
            if (Thread.CurrentThread.CurrentUICulture.EnglishName.ToLower().Contains("en"))
            {
                 doc = new XpsDocument("CompanyProfile.xps", FileAccess.Read);
            }
            else
            {
                doc = new XpsDocument("CompanyProfile-ZH.xps", FileAccess.Read);
            }
            documentViewer.Document = doc.GetFixedDocumentSequence();
            
        }
    }
}
